
package com.hlkj.pay.app.merchant.ext.impl.heepay;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;

import com.hlkj.framework.common.pojo.CommonResult;
import com.hlkj.framework.common.util.json.JsonUtils;
import com.hlkj.framework.extension.annotation.Extension;
import com.hlkj.pay.app.merchant.ext.ChannelMerchantProfitOrderExtPt;
import com.hlkj.pay.app.merchant.ext.MerchantExtConstant;
import com.hlkj.pay.app.merchant.ext.dto.profit.ChannelProfitOrderContext;
import com.hlkj.pay.app.merchant.ext.dto.profit.ChannelProfitOrderQueryContext;
import com.hlkj.pay.app.merchant.ext.impl.heepay.constanct.HeePayConstant;
import com.hlkj.pay.app.merchant.ext.impl.heepay.dto.*;
import com.hlkj.pay.app.merchant.ext.impl.heepay.handler.HeePayMerchantCommonParamsHandle;
import com.hlkj.pay.app.merchant.ext.impl.heepay.util.HeePayParamUtils;
import com.hlkj.pay.dto.order.PayOrderFundDto;
import com.hlkj.pay.dto.order.RefundOrderFundDto;
import com.hlkj.pay.enums.MerchantEnum;
import com.hlkj.pay.enums.PayOrderEnums;
import com.hlkj.pay.infrastructure.model.merchant.MerchantAppChannelDO;
import com.hlkj.pay.infrastructure.model.order.OrderFundDO;
import com.hlkj.pay.infrastructure.model.order.OrderFundDetailDO;
import com.hlkj.pay.infrastructure.model.order.PayOrderDO;
import com.hlkj.pay.infrastructure.model.pay.PayChannelRequestDO;
import com.hlkj.pay.util.DateUtils;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @author HlpayTeam
 * @date 2025/01/06 17:47
 */
@Slf4j
@Repository
@RequiredArgsConstructor
@Extension(bizId = MerchantExtConstant.CHANNEL_HEEPAY)
public class HeePayMerchantProfitOrderExtPt implements ChannelMerchantProfitOrderExtPt {

    private final HeePayMerchantCommonParamsHandle heePayMerchantCommonParamsHandle;

    @Override
    public void submitOrderProfit(ChannelProfitOrderContext channelProfitOrderContext) {
        // 配置转换
        CommonResult<HeePayConfig> commonResult = heePayMerchantCommonParamsHandle.heePayConfig(channelProfitOrderContext.getProviderChannelConfig(),
                channelProfitOrderContext.isTest());
        HeePayConfig heliPayConfig = commonResult.getData();
        PayOrderDO payOrderDO = channelProfitOrderContext.getPayOrderDO();
        MerchantAppChannelDO merchantAppChannelDO = channelProfitOrderContext.getMerchantAppChannelDO();
        HeePayAppChannelParams heliPayAppChannelParams = heePayMerchantCommonParamsHandle.heePayAppChannelParams(merchantAppChannelDO,heliPayConfig);
        try {
            List<PayOrderFundDto> payOrderFundList = channelProfitOrderContext.getPayOrderFundDtoList();
            Map<String, String> params = new HashMap<>();
            Set<String> subject = new HashSet<>();
            params.put("version", "3");
            params.put("agent_id", heliPayConfig.getAgentId());
            params.put("agent_bill_id", payOrderDO.getPayOrderNo());
            if(!MerchantEnum.APP_CHANNEL_TYPE.MERCHANT_COMMON.getCode().equals(merchantAppChannelDO.getType())){
                params.put("ref_agent_id", heliPayAppChannelParams.getHeePayId());
            }
            params.put("jnet_bill_no", payOrderDO.getChannelOrderNo());
            // List<OrderFundDetailDO> upPayOrderFundList = new ArrayList<>();
            params.put("batch_no", payOrderFundList.get(0).getBatchNo());
            params.put("timestamp", System.currentTimeMillis() + "");
            StringBuilder sb = new StringBuilder();
            for (PayOrderFundDto refundOrderFundDO : payOrderFundList) {
                sb.append(refundOrderFundDO.getAccountNo());
                sb.append("^");
                sb.append(refundOrderFundDO.getAmount());
                sb.append("^");
                sb.append("F");
                sb.append("^");
                sb.append(refundOrderFundDO.getDescription());
                sb.append("|");
            }
            params.put("allot_data", sb.toString().substring(0, sb.toString().length() - 1));
            subject.add("allot_data");
            PayChannelRequestDO payChannelRequest = new PayChannelRequestDO();
            payChannelRequest.setRequestParams(JsonUtils.toJsonString(params));
            CommonResult<String> resultResult = heePayMerchantCommonParamsHandle.heePayOrderRequest(HeePayConstant.PROFIT_ORDER_SUBMIT_URL, heliPayConfig, params,
                    HeePayConstant.PROFIT_ORDER_SUBMIT_FIELD, subject);
            log.info("汇付宝 订单分润 返回参数:{}", JsonUtils.toJsonString(resultResult));
            payChannelRequest.setResponse(JsonUtils.toJsonString(resultResult.getData()));
            channelProfitOrderContext.setPayChannelRequest(payChannelRequest);
            channelProfitOrderContext.setRequestUrl(HeePayConstant.PROFIT_ORDER_SUBMIT_URL);
            String respDesc;
            PayOrderEnums.PAY_ORDER_FUND_STATUS payOrderFundStatus;
            if (!resultResult.isSuccess()) {
                payOrderFundStatus = PayOrderEnums.PAY_ORDER_FUND_STATUS.FAIL;
                respDesc = "汇付宝订单分润请求失败,失败信息:" + resultResult.getMsg();
            }
            else {
                Map<String, String> paramsMap = HeePayParamUtils.params(resultResult.getData());
                HeePayCommonRes heliPayOrderCommonRes = JsonUtils.parseObject(JsonUtils.toJsonStringNotNull(paramsMap), HeePayCommonRes.class);
                if (!HeePayConstant.PROFIT_REQUEST_SUCCESS.equals(heliPayOrderCommonRes.getRet_code())) {
                    respDesc = heliPayOrderCommonRes.getRet_msg();
                    payOrderFundStatus = PayOrderEnums.PAY_ORDER_FUND_STATUS.FAIL;
                }
                else {
                    respDesc = null;
                    payOrderFundStatus = PayOrderEnums.PAY_ORDER_FUND_STATUS.FUNDING;
                }
            }
            payOrderFundList.stream().forEach(payOrderFundDO -> {
                // OrderFundDetailDO orderFundDO = new OrderFundDetailDO();
                // orderFundDO.setId(payOrderFundDO.getId());
                payOrderFundDO.setFundStatus(payOrderFundStatus);
                payOrderFundDO.setFailReason(respDesc);
                // upPayOrderFundList.add(orderFundDO);
            });
            // channelProfitOrderContext.setUpdatePayOrderFundList(upPayOrderFundList);
        }
        catch (Exception e) {
            e.printStackTrace();
            log.error("汇付宝提交订单分润请求失败 message:{}", e.getMessage(), e);
            channelProfitOrderContext.setRemark("汇付宝提交订单分润请求失败,失败信息:" + e.getMessage());
            channelProfitOrderContext.setProcessStatus(Boolean.FALSE);
        }
    }

    @Override
    public void queryOrderProfit(ChannelProfitOrderQueryContext channelProfitOrderQueryContext) {
        // 配置转换
        CommonResult<HeePayConfig> commonResult = heePayMerchantCommonParamsHandle.heePayConfig(channelProfitOrderQueryContext.getProviderChannelConfig(),
                channelProfitOrderQueryContext.isTest());
        HeePayConfig heliPayConfig = commonResult.getData();
        PayOrderDO payOrderDO = channelProfitOrderQueryContext.getPayOrderDO();
        HeePayAppChannelParams heliPayAppChannelParams = heePayMerchantCommonParamsHandle.heePayAppChannelParams(channelProfitOrderQueryContext.getMerchantAppChannelDO(),heliPayConfig);
        try {
            List<OrderFundDetailDO> payOrderFundList = channelProfitOrderQueryContext.getPayOrderFunds();
            Map<String, String> params = new HashMap<>();
            params.put("version", "3");
            params.put("agent_id", heliPayConfig.getAgentId());
            params.put("agent_bill_id", payOrderDO.getPayOrderNo());
            params.put("jnet_bill_no", payOrderDO.getChannelOrderNo());
            params.put("batch_no", payOrderFundList.get(0).getBatchNo());
            params.put("timestamp", System.currentTimeMillis() + "");
            CommonResult<String> resultResult = heePayMerchantCommonParamsHandle.heePayOrderRequest(HeePayConstant.PROFIT_ORDER_QUERY_URL, heliPayConfig, params,
                    HeePayConstant.PROFIT_ORDER_QUERY_FIELD);
            log.info("汇付宝 订单分润查询 返回参数:{}", JsonUtils.toJsonString(resultResult));

            if (!resultResult.isSuccess()) {
                channelProfitOrderQueryContext.setProcessStatus(false);
                channelProfitOrderQueryContext.setRemark("汇付宝订单分润查询请求失败,失败信息:" + resultResult.getMsg());
                return;
            }
            Map<String, String> paramsMap = HeePayParamUtils.params(resultResult.getData());
            HeeProfitOrderRes heePayCommonRes = JsonUtils.parseObject(JsonUtils.toJsonStringNotNull(paramsMap), HeeProfitOrderRes.class);
            if (HeePayConstant.PROFIT_REQUEST_SUCCESS.equals(heePayCommonRes.getRet_code())) {
                String allotData = heePayCommonRes.getAllot_data();
                if (StringUtils.hasText(allotData)) {
                    HeeProfitOrderDataRes profitOrderDataRes = JsonUtils.parseObject(allotData, HeeProfitOrderDataRes.class);
                    List<HeeProfitOrderDataRes.AllotListBean> allotList = profitOrderDataRes.getAllot_list();
                    Map<String, HeeProfitOrderDataRes.AllotListBean> allotListMap = allotList.stream()
                            .collect(Collectors.toMap(allotListBean -> allotListBean.getTo_login_account(), Function.identity()));
                    payOrderFundList.stream().forEach(payOrderFundDO -> {
                        HeeProfitOrderDataRes.AllotListBean allotListBean = allotListMap.get(payOrderFundDO.getAccountNo());
                        if (allotListBean != null && StringUtils.hasText(allotListBean.getSettle_status())) {
                            // 结算状态。NotBeginSettle-未开始结算,Settling-结算中，SettleFinish-结算完成，收款人已收到款
                            switch (allotListBean.getSettle_status()) {
                                case "SettleFinish":
                                    payOrderFundDO.setFundStatus(PayOrderEnums.PAY_ORDER_FUND_STATUS.SUCCESS.getCode());
                                    if (StringUtils.hasText(allotListBean.getSettle_time())) {
                                        payOrderFundDO.setSuccessTime(DateUtils.shanghaiDate(allotListBean.getSettle_time(), "yyyy-MM-dd HH:mm:ss"));
                                    }
                                    // 收款人账号类型。T-个人账号,F-商户账号
                                    payOrderFundDO.setType(allotListBean.getIs_personal());
                                    break;
                                default:
                            }
                        }
                    });
                }
            }
            else {
                channelProfitOrderQueryContext.setProcessStatus(false);
                channelProfitOrderQueryContext.setRemark("汇付宝订单分润查询请求失败,失败信息:" + resultResult.getMsg());
                return;
            }
        }
        catch (Exception e) {
            e.printStackTrace();
            log.error("汇付宝提交订单分润请求失败 message:{}", e.getMessage(), e);
            channelProfitOrderQueryContext.setRemark("汇付宝提交订单分润请求失败,失败信息:" + e.getMessage());
            channelProfitOrderQueryContext.setProcessStatus(Boolean.FALSE);
        }
    }

    @Override
    public void submitRefundOrderProfit(ChannelProfitOrderContext channelProfitOrderContext) {
        // 配置转换
        CommonResult<HeePayConfig> commonResult = heePayMerchantCommonParamsHandle.heePayConfig(channelProfitOrderContext.getProviderChannelConfig(),
                channelProfitOrderContext.isTest());
        HeePayConfig heliPayConfig = commonResult.getData();
        PayOrderDO payOrderDO = channelProfitOrderContext.getPayOrderDO();
        MerchantAppChannelDO merchantAppChannelDO = channelProfitOrderContext.getMerchantAppChannelDO();
        HeePayAppChannelParams heliPayAppChannelParams = heePayMerchantCommonParamsHandle.heePayAppChannelParams(merchantAppChannelDO,heliPayConfig);
        try {
            List<RefundOrderFundDto> payOrderFundList = channelProfitOrderContext.getRefundOrderFundDtoList();
            Map<String, String> params = new HashMap<>();
            Set<String> subject = new HashSet<>();
            params.put("version", "3");
            params.put("agent_id", heliPayConfig.getAgentId());
            params.put("agent_bill_id", payOrderDO.getPayOrderNo());
            if(!MerchantEnum.APP_CHANNEL_TYPE.MERCHANT_COMMON.getCode().equals(merchantAppChannelDO.getType())){
                params.put("ref_agent_id", heliPayAppChannelParams.getHeePayId());
            }
            params.put("jnet_bill_no", payOrderDO.getChannelOrderNo());
            List<OrderFundDetailDO> upPayOrderFundList = new ArrayList<>();
            params.put("batch_no", payOrderFundList.get(0).getBatchNo());
            params.put("timestamp", DateUtils.dateToString(System.currentTimeMillis(), "yyyyMMddHHmmss"));
            StringBuilder sb = new StringBuilder();
            for (RefundOrderFundDto orderFundDetailDO : payOrderFundList) {
                sb.append(orderFundDetailDO.getType());
                sb.append("^");
                sb.append(orderFundDetailDO.getAccountNo());
                sb.append("^");
                sb.append(orderFundDetailDO.getAmount());
                sb.append("^");
                sb.append(orderFundDetailDO.getDescription());
                sb.append("|");
            }
            params.put("allot_data", sb.toString().substring(0, sb.toString().length() - 1));
            subject.add("allot_data");
            // params.put("allot_data",
            // heePayMerchantCommonParamsHandle.subject(sb.toString().substring(0,
            // sb.toString().length() - 1)));
            PayChannelRequestDO payChannelRequest = new PayChannelRequestDO();
            payChannelRequest.setRequestParams(JsonUtils.toJsonString(params));
            CommonResult<String> resultResult = heePayMerchantCommonParamsHandle.heePayOrderRequest(HeePayConstant.PROFIT_REFUND_ORDER_SUBMIT_URL, heliPayConfig, params,
                    HeePayConstant.PROFIT_ORDER_SUBMIT_FIELD, subject);
            log.info("汇付宝 订单分润退款 返回参数:{}", JsonUtils.toJsonString(resultResult));
            payChannelRequest.setResponse(JsonUtils.toJsonString(resultResult.getData()));
            channelProfitOrderContext.setPayChannelRequest(payChannelRequest);
            channelProfitOrderContext.setRequestUrl(HeePayConstant.PROFIT_REFUND_ORDER_SUBMIT_URL);
            String respDesc;
            PayOrderEnums.PAY_ORDER_FUND_STATUS payOrderFundStatus;
            if (!resultResult.isSuccess()) {
                payOrderFundStatus = PayOrderEnums.PAY_ORDER_FUND_STATUS.FAIL;
                respDesc = "汇付宝订单分润退款请求失败,失败信息:" + resultResult.getMsg();
            }
            else {
                Map<String, String> paramsMap = HeePayParamUtils.params(resultResult.getData());
                HeePayCommonRes heliPayOrderCommonRes = JsonUtils.parseObject(JsonUtils.toJsonStringNotNull(paramsMap), HeePayCommonRes.class);
                if (!HeePayConstant.PROFIT_REQUEST_SUCCESS.equals(heliPayOrderCommonRes.getRet_code())) {
                    respDesc = heliPayOrderCommonRes.getRet_msg();
                    payOrderFundStatus = PayOrderEnums.PAY_ORDER_FUND_STATUS.FAIL;
                }
                else {
                    respDesc = null;
                    payOrderFundStatus = PayOrderEnums.PAY_ORDER_FUND_STATUS.FUNDING;
                }
            }
            payOrderFundList.stream().forEach(payOrderFundDO -> {
                // OrderFundDetailDO orderFundDO = new OrderFundDetailDO();
                // orderFundDO.setId(payOrderFundDO.getId());
                payOrderFundDO.setFundStatus(payOrderFundStatus);
                payOrderFundDO.setFailReason(respDesc);
                // upPayOrderFundList.add(orderFundDO);
            });
            // channelProfitOrderContext.setUpdateRefundOrderFundList(upPayOrderFundList);
        }
        catch (Exception e) {
            e.printStackTrace();
            log.error("汇付宝提交订单分润退款请求失败 message:{}", e.getMessage(), e);
            channelProfitOrderContext.setRemark("汇付宝提交订单分润退款请求失败,失败信息:" + e.getMessage());
            channelProfitOrderContext.setProcessStatus(Boolean.FALSE);
        }
    }

    @Override
    public void queryRefundOrderProfit(ChannelProfitOrderQueryContext channelProfitOrderQueryContext) {
        // 配置转换
        CommonResult<HeePayConfig> commonResult = heePayMerchantCommonParamsHandle.heePayConfig(channelProfitOrderQueryContext.getProviderChannelConfig(),
                channelProfitOrderQueryContext.isTest());
        HeePayConfig heliPayConfig = commonResult.getData();
        PayOrderDO payOrderDO = channelProfitOrderQueryContext.getPayOrderDO();
        try {
            List<OrderFundDetailDO> payOrderFundList = channelProfitOrderQueryContext.getRefundOrderFunds();
            Map<String, String> params = new HashMap<>();
            params.put("version", "3");
            params.put("agent_id", heliPayConfig.getAgentId());
            params.put("agent_bill_id", payOrderDO.getPayOrderNo());
            params.put("jnet_bill_no", payOrderDO.getChannelOrderNo());
            params.put("batch_no", payOrderFundList.get(0).getBatchNo());
            params.put("timestamp", DateUtils.dateToString(System.currentTimeMillis(), "yyyyMMddHHmmss"));
            CommonResult<String> resultResult = heePayMerchantCommonParamsHandle.heePayOrderRequest(HeePayConstant.PROFIT_REFUND_ORDER_QUERY_URL, heliPayConfig, params,
                    HeePayConstant.PROFIT_REFUND_ORDER_QUERY_FIELD);
            log.info("汇付宝 订单分润退款查询 返回参数:{}", JsonUtils.toJsonString(resultResult));

            if (!resultResult.isSuccess()) {
                channelProfitOrderQueryContext.setProcessStatus(false);
                channelProfitOrderQueryContext.setRemark("汇付宝订单分润退款查询请求失败,失败信息:" + resultResult.getMsg());
                return;
            }
            Map<String, String> paramsMap = HeePayParamUtils.params(resultResult.getData());
            HeeProfitOrderRes heePayCommonRes = JsonUtils.parseObject(JsonUtils.toJsonStringNotNull(paramsMap), HeeProfitOrderRes.class);
            if (HeePayConstant.PROFIT_REQUEST_SUCCESS.equals(heePayCommonRes.getRet_code())) {
                String allotData = heePayCommonRes.getAllot_data();
                if (StringUtils.hasText(allotData)) {
                    HeeProfitOrderDataRes profitOrderDataRes = JsonUtils.parseObject(allotData, HeeProfitOrderDataRes.class);
                    List<HeeProfitOrderDataRes.AllotListBean> allotList = profitOrderDataRes.getAllot_list();
                    Map<String, HeeProfitOrderDataRes.AllotListBean> allotListMap = allotList.stream()
                            .collect(Collectors.toMap(allotListBean -> allotListBean.getFrom_login_account(), Function.identity()));
                    payOrderFundList.stream().forEach(payOrderFundDO -> {
                        HeeProfitOrderDataRes.AllotListBean allotListBean = allotListMap.get(payOrderFundDO.getAccountNo());
                        if (allotListBean != null && StringUtils.hasText(allotListBean.getSettle_status())) {
                            // 0-未开始结算,2-结算完成
                            switch (allotListBean.getSettle_status()) {
                                case "2":
                                    payOrderFundDO.setFundStatus(PayOrderEnums.PAY_ORDER_FUND_STATUS.SUCCESS.getCode());
                                    if (StringUtils.hasText(allotListBean.getSettle_time())) {
                                        payOrderFundDO.setSuccessTime(DateUtils.shanghaiDate(allotListBean.getSettle_time(), "yyyy-MM-dd HH:mm:ss"));
                                    }
                                    // 收款人账号类型。T-个人账号,F-商户账号
                                    payOrderFundDO.setType(allotListBean.getIs_personal());
                                    break;
                                default:
                            }
                        }
                    });
                }
            }
            else {
                channelProfitOrderQueryContext.setProcessStatus(false);
                channelProfitOrderQueryContext.setRemark("汇付宝订单分润退款查询请求失败,失败信息:" + resultResult.getMsg());
                return;
            }
        }
        catch (Exception e) {
            e.printStackTrace();
            log.error("汇付宝提交订单分润退款查询请求失败 message:{}", e.getMessage(), e);
            channelProfitOrderQueryContext.setRemark("汇付宝提交订单分润退款查询失败,失败信息:" + e.getMessage());
            channelProfitOrderQueryContext.setProcessStatus(Boolean.FALSE);
        }
    }

    @Override
    public void finishAcctOrder(ChannelProfitOrderContext channelProfitOrderContext) {
        // 配置转换
        CommonResult<HeePayConfig> commonResult = heePayMerchantCommonParamsHandle.heePayConfig(channelProfitOrderContext.getProviderChannelConfig(),
                channelProfitOrderContext.isTest());
        HeePayConfig heliPayConfig = commonResult.getData();
        PayOrderDO payOrderDO = channelProfitOrderContext.getPayOrderDO();
        MerchantAppChannelDO merchantAppChannelDO = channelProfitOrderContext.getMerchantAppChannelDO();
        HeePayAppChannelParams heliPayAppChannelParams = heePayMerchantCommonParamsHandle.heePayAppChannelParams(merchantAppChannelDO,heliPayConfig);
        try {
            OrderFundDO orderFundDO = channelProfitOrderContext.getOrderFundDO();
            Map<String, String> params = new HashMap<>();
            Set<String> subject = new HashSet<>();
            params.put("version", "3");
            params.put("agent_id", heliPayConfig.getAgentId());
            params.put("agent_bill_id", payOrderDO.getPayOrderNo());
            if(!MerchantEnum.APP_CHANNEL_TYPE.MERCHANT_COMMON.getCode().equals(merchantAppChannelDO.getType())){
                params.put("ref_agent_id", heliPayAppChannelParams.getHeePayId());
            }
            params.put("jnet_bill_no", payOrderDO.getChannelOrderNo());
            params.put("batch_no", orderFundDO.getBatchNo());
            params.put("timestamp", System.currentTimeMillis() + "");
            params.put("description", "");
            CommonResult<String> resultResult = heePayMerchantCommonParamsHandle.heePayOrderRequest(HeePayConstant.PROFIT_ORDER_FINISH_URL, heliPayConfig, params,
                    HeePayConstant.PROFIT_ORDER_FINISH_FIELD, subject);
            log.info("汇付宝 订单分润结束 返回参数:{}", JsonUtils.toJsonString(resultResult));

            if (!resultResult.isSuccess()) {
                channelProfitOrderContext.setProcessStatus(false);
                channelProfitOrderContext.setRemark("汇付宝订单分润结束请求失败,失败信息:" + resultResult.getMsg());
            }
            else {
                Map<String, String> paramsMap = HeePayParamUtils.params(resultResult.getData());
                HeePayCommonRes heliPayOrderCommonRes = JsonUtils.parseObject(JsonUtils.toJsonStringNotNull(paramsMap), HeePayCommonRes.class);
                if (!HeePayConstant.PROFIT_REQUEST_SUCCESS.equals(heliPayOrderCommonRes.getRet_code())) {
                    channelProfitOrderContext.setRemark(heliPayOrderCommonRes.getRet_msg());
                    channelProfitOrderContext.setProcessStatus(false);
                }
            }
        }
        catch (Exception e) {
            e.printStackTrace();
            log.error("汇付宝提交订单分润结束请求失败 message:{}", e.getMessage(), e);
            channelProfitOrderContext.setRemark("汇付宝提交订单分润结束请求失败,失败信息:" + e.getMessage());
            channelProfitOrderContext.setProcessStatus(Boolean.FALSE);
        }
    }

    @Override
    public CommonResult<String> acctStatusParse(HttpServletRequest request, ChannelProfitOrderContext channelProfitOrderContext) {
        return null;
    }

    @Override
    public void settleConfirm(ChannelProfitOrderContext channelProfitOrderContext) {

    }
}
